package com.unbank.callitnew;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.PropertyConfigurator;

import com.unbank.callitnew.action.MyTracker2;
import com.unbank.callitnew.entity.WebBean;
import com.unbank.util.ConfigUtil;
import com.unbank.util.FinalWord;

public class CallitNewConsole {
	private static Log log = LogFactory.getLog(CallitNewConsole.class);
	static {
		// 启动日志
		try {
			PropertyConfigurator.configure(CallitNewConsole.class
					.getClassLoader().getResource("").toURI().getPath()
					+ FinalWord.LOGFILE);
			log.info("---日志系统启动成功---");
		} catch (Exception e) {
			log.error("日志系统启动失败:" + e);
		}
	}

	public static void main(String[] args) {

		List<WebBean> beans = ConfigUtil.getWebBeans();
		for (WebBean bean : beans) {
			try {
				new MyTracker2().getInfo(bean);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
}
